package com.atguigu.BigDecimal;

import java.math.BigDecimal;

public class bigdecimal {


    public static void main(String[] args) {

        BigDecimal amount3 = new BigDecimal("0.03");
        BigDecimal amount4 = new BigDecimal("0.02");

        System.out.println(amount3.subtract(amount4));

        BigDecimal amount5 = BigDecimal.valueOf(0.03);
        BigDecimal amount6 = BigDecimal.valueOf(0.02);

        System.out.println(amount5.subtract(amount6));

        BigDecimal amount7 = BigDecimal.valueOf(1.0);
        BigDecimal amount8 = BigDecimal.valueOf(1.00);

        System.out.println(amount7==amount8);
        System.out.println(amount7.equals(amount8));

    }
}
